<template>
  <div>
    <!-- 一般用于vue有动画效果 xx  vvv -->
    <Filmitem :nowplays="nowplays" :key="nowplays.length"></Filmitem>
  </div>
</template>

<script>
import Filmitem from "../../components/Filmitem";

// 调用api请求数据方法
import { filmListData } from "../../api/api";

export default {
  components: {
    Filmitem,
  },
  data() {
    return {
      page: 1,
      // 正在热映数据源
      nowplays: [],
      top: 0,
    };
  },
  async mounted() {
    let ret = await filmListData(this.page);
    this.nowplays = ret.data.data.films;
  },
};
</script>

<style lang="scss" scoped>
</style>
